<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>投资信息</title>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="./plugins/bootstrap/css/bootstrap.css">
  <link rel="stylesheet" href="./css/main.css">
</head>
<body>
  <div class="content">
    <h5 class="content-title">持有证券资产</h5>
    <div class='row'>
      <div class="col">
        <div class="box">
          <div class="box-body">
            <div class="chart" id="line" style="height:500px;"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col">
        <div class="box">
          <div class="box-body">
            <table class="table table-borderless">
              <thead>
                <tr>
                  <th scope="col">截止日期</th>
                  <th scope="col">持有数量(股)</th>
                  <th scope="col">持有金额(元)</th>
                  <th scope="col">期末账面价值(元)</th>
                  <th scope="col">持有比例(%)</th>
                  <th scope="col">币种</th>
                  <th scope="col">持有证券代码</th>
                  <th scope="col">投资类型</th>
                  <th scope="col">公告日期</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td>2021-01-01</td>
                  <td>5,346,789.00</td>
                  <td></td>
                  <td>5,346,789.00</td>
                  <td>32%</td>
                  <td>人民币</td>
                  <td>1234567888</td>
                  <td>证券投资</td>
                  <td>2021-01-01</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
  <script src="plugins/jquery/jquery.min.js"></script>
  <script src="js/echarts.js"></script>
  <script>
    $(function() {
      var myChart = echarts.init(document.getElementById('line'))
      var colorList = ["#2B9DF8", '#FBB969', '#F36154', '#3EC3CE', '#B1C5D4', '#705AFC', '#4363DA', '#00E574']
      var xData = ['2020/01', '2020/02', '2020/03', '2020/04', '2020/05', '2020/06', '2020/07']
      var option = {
        color:colorList,
        legend: {
          icon: 'circle',
          bottom: '5%',
          right: 'center',
          itemWidth: 6,
          itemGap: 20,
          textStyle: {
            color: '#556677'
          }
        },
        tooltip: {
          trigger: 'axis',
          
          axisPointer: {
            lineStyle: {
              width: 1,
              color: {
                  type: 'linear',
                  x: 0,
                  y: 0,
                  x2: 0,
                  y2: 1,
                  colorStops: [{
                      offset: 0,
                      color: '#2B9DF8' // 0% 处的颜色
                  },{
                      offset: 1,
                      color: '#2B9DF8' // 100% 处的颜色
                  }],
                  global: false // 缺省为 false
              }
            },
            label: {
              show: true,
              backgroundColor: '#fff',
              color: '#BDD8E9',
              borderColor: 'rgba(0,0,0,0)',
              shadowColor: 'rgba(0,0,0,0)',
              shadowOffsetY: 0
            },
            
          },
          backgroundColor: '#fff',
          textStyle: {
            color: '#5c6c7c'
          },
          padding: [10, 10],
          extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)'
        },
        grid: {
          left:'3%',
          right:'3%',
          top: '5%',
          bottom:'20%'
        },
        xAxis: [{
          type: 'category',
          data: xData,
          axisLine: { //  改变x轴颜色
            lineStyle: {
              color: '#DBDBDB 100%',
            }
          },
          axisTick: {
            show: false
          },
          axisLabel: { //  改变x轴字体颜色和大小
            textStyle: {
              color: "#dfdfdf",
              fontSize: 12
            },
          },
          splitLine: {
            show: false,
            lineStyle: {
              color: ['#DBDBDB 100%'],
              width: 1,
              type: 'solid'
            }
          },
          boundaryGap: false
        }],
        yAxis: [{
          type: 'value',
          max: 100,
          axisTick: {
            show: false
          },
          axisLine: {
            show: false,
            lineStyle: {
              color: 'rgba(107,107,107,0.37)', //y轴颜色
            }
          },
          axisLabel: {
            formatter: '{value} %',
            textStyle: {
              color: "#4d4d4d",
              fontSize: 12
            }
          },
          splitLine: {
            show: true,
            lineStyle: {
              color: ['#ecf2f2'],
              width: 1,
              type: 'solid'
            }
          }
        }],
        series: [{
          name: '当前证券股价',
          type: 'line',
          data: [100, 10, 90, 12, 49, 3, 7],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        }, {
          name: '股权',
          type: 'line',
          data: [50, 12, 21, 14, 95, 16, 10],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '上证指数',
          type: 'line',
          data: [59, 34, 11, 94, 25, 16, 30],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '深证指数',
          type: 'line',
          data: [34, 52, 100, 90, 25, 16, 80],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '沪深300',
          type: 'line',
          data: [65, 32, 11, 64, 25, 96, 100],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '上证50',
          type: 'line',
          data: [59, 12, 42, 14, 55, 16, 90],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '中证500',
          type: 'line',
          data: [40, 12, 61, 34, 25, 86, 10],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        },{
          name: '创业板指数',
          type: 'line',
          data: [50, 32, 100, 14, 55, 16, 10],
          symbolSize: 1,
          symbol: 'circle',
          smooth: true,
          yAxisIndex: 0,
          showSymbol: false,
          lineStyle: {
            width: 2,
          }
        }]
      };

      myChart.setOption(option)
      // 把echart实例追加到最外层window上
      window.top.chartsList && window.top.chartsList.push(myChart)
    })
  </script>
</body>
</html>